package com.eksboot.proxy.dynamic;

import com.eksboot.proxy.Target;
import com.eksboot.proxy.TargetImpl;

/**
 * DynamicProxyTest
 *
 * @author: chenfenghai
 * @version: 1.0
 * @date: 2021-05-25 14:52
 */
public class DynamicProxyTest1 {

    public static void main(String[] args) {
        Target target = new TargetImpl();
        //返回的是代理对象，实现了Target接口，
        //实际调用方法的时候，是调用TargetProxy的invoke()方法
        Target targetProxy = (Target) TargetProxy.wrap(target);
        targetProxy.execute(" HelloWord ");

    }
}
